package com.tmpt.dto;

import com.inspiresoftware.lib.dto.geda.annotations.Dto;
import com.inspiresoftware.lib.dto.geda.annotations.DtoCollection;
import com.inspiresoftware.lib.dto.geda.annotations.DtoField;
import com.tmpt.beans.A2Dept;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;


@Dto("com.tmpt.beans.A2Company")
public class A2CompanyDto implements Serializable{
	private static final long serialVersionUID = 1L;

	@DtoField
	private long id ;//公司ID ;
	@DtoField
	private String name;// 公司名 ;

	@DtoField
	private int deleteFlag ;//default0,1已删除
	@DtoField(readOnly=true)
	private Timestamp createDate ;
	@DtoField
	private Timestamp modifyDate ;
	@DtoField
	private String createMan ;
	@DtoField
	private String modifyMan ;

	@DtoCollection(
			value="a2DeptList",
			dtoToEntityMatcher=A2Company_DeptMatcher.class,
			entityGenericType=A2Dept.class,
			dtoBeanKey="a2DeptDto",
			entityBeanKeys="a2Dept",
			readOnly=true
	)
	private List<A2DeptDto> a2DeptDtoList = new ArrayList<A2DeptDto>();
	
	/*
	@OneToMany(mappedBy="a2Company",fetch=FetchType.LAZY)
	private List<A2Dept> a2DeptList = new ArrayList<A2Dept>();
	
	@OneToMany(mappedBy="a2Company",fetch=FetchType.LAZY)
	private List<A2User> a2UserList = new ArrayList<A2User>();
	*/

	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public Timestamp getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Timestamp createDate) {
		this.createDate = createDate;
	}

	public Timestamp getModifyDate() {
		return modifyDate;
	}

	public void setModifyDate(Timestamp modifyDate) {
		this.modifyDate = modifyDate;
	}

	public String getCreateMan() {
		return createMan;
	}

	public void setCreateMan(String createMan) {
		this.createMan = createMan;
	}

	public String getModifyMan() {
		return modifyMan;
	}

	public void setModifyMan(String modifyMan) {
		this.modifyMan = modifyMan;
	}

	public List<A2DeptDto> getA2DeptDtoList() {
		return a2DeptDtoList;
	}

	public void setA2DeptDtoList(List<A2DeptDto> a2DeptDtoList) {
		this.a2DeptDtoList = a2DeptDtoList;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	
}
